﻿<Window x:Class="MyChars.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:s="clr-namespace:System;assembly=mscorlib"
        x:Name="window1"
        Title="MyChars"
        Height="352" Width="115"
        Icon="sopel.ico"
        Language="en"
        WindowState="Minimized"
        WindowStartupLocation="CenterScreen"
        Loaded="Window_Loaded_1"
        WindowStyle="ToolWindow" ResizeMode="NoResize" ShowInTaskbar="False" Topmost="True" Closing="window1_Closing"
        >
    
    <Window.Resources>
        <s:Double x:Key="buttonSide">23</s:Double>


        <s:String x:Key="label_Error">Error</s:String>
        <s:String x:Key="label_ErrorInConfigFile">Error in configuration file [{0}]\nLine {1}\nMessage: {2}</s:String>
        <s:String x:Key="label_EditConfigFile">Problem with configuration file [{0}]\nMessage: {1}</s:String>
        <s:String x:Key="label_WriteConfigFile">Are You Sure?</s:String>
        <s:String x:Key="label_OverwriteConfigFile">Overwrite configuration file?</s:String>

        <s:String x:Key="label_Error_PL">Błąd</s:String>
        <s:String x:Key="label_ErrorInConfigFile_PL">Błąd w pliku konfiguracyjnym [{0}]\nWiersz {1}\nKomunikat: {2}</s:String>
        <s:String x:Key="label_EditConfigFile_PL">Problem z plikiem konfiguracyjnym [{0}]\nKomunikat: {1}</s:String>
        <s:String x:Key="label_WriteConfigFile_PL">Czy na pewno?</s:String>
        <s:String x:Key="label_OverwriteConfigFile_PL">Nadpisać plik konfiguracyjny?</s:String>



        <s:String x:Key="fileMenuItem_PL">Plik</s:String>
        <s:String x:Key="topmostConfigurationFileMenuItem_PL">Na wierzchu</s:String>
        <s:String x:Key="editConfigurationFileMenuItem_PL">Edytuj plik konfiguracyjny</s:String>
        <s:String x:Key="writeCleanConfigFileMenuItem_PL">Zapisz oryginalny plik konfiguracyjny</s:String>
        <s:String x:Key="exitToolStripMenuItem_PL">Zamknij</s:String>
        
        <Style x:Name="buttonStyle" TargetType="Button">
            <Setter Property="Width" Value="{StaticResource buttonSide}"/>
            <Setter Property="Height" Value="{StaticResource buttonSide}"/>
            <Setter Property="FontSize" Value="16.0"/>
            <Setter Property="FontFamily" Value="GenericMonospace"/>
            <Setter Property="FontWeight" Value="SemiBold"/>
            <Setter Property="FontStyle" Value="Normal"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
            <Setter Property="Background">
                <Setter.Value>
                    <LinearGradientBrush>
                        <GradientStop Offset="0.0" Color="LightGoldenrodYellow"/>
                        <GradientStop Offset="1.0" Color="LightGreen"/>
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
        </Style>
        
        <Style TargetType="ListView">
            <Setter Property="Background" Value="CornflowerBlue"></Setter>
        </Style>
        
        <Style TargetType="ListViewItem">
            <Setter Property="Background">
                <Setter.Value>
                    <LinearGradientBrush>
                        <GradientStop Offset="0.0" Color="SandyBrown"/>
                        <GradientStop Offset="1.0" Color="AntiqueWhite"/>
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="{x:Type  ScrollBar}">
            <Setter Property="Background" Value="LightGoldenrodYellow" />
        </Style>


        <Style TargetType="{x:Type GridViewColumnHeader}">
            <Setter Property="Visibility" Value="Collapsed" />
        </Style>

    </Window.Resources>

    <Grid x:Name="grid1" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition x:Name="menu" Height="20" />
            <RowDefinition x:Name="names" Height="86" />
            <RowDefinition x:Name="buttons" />
        </Grid.RowDefinitions>
        <Menu IsMainMenu="True" Grid.Row="0" Background="CadetBlue">
            <MenuItem x:Name="fileMenuItem" Header="File">
                <MenuItem Header="On Top" x:Name="topmostConfigurationFileMenuItem" Click="topmostConfigurationFileMenuItem_Click_1" IsCheckable="True" IsChecked="True">
                </MenuItem>
                <Separator/>
                <MenuItem Header="Edit Configuration File" x:Name="editConfigurationFileMenuItem" Click="editConfigurationFileMenuItem_Click">
                </MenuItem>
                <MenuItem Header="Write Clean Config File" x:Name="writeCleanConfigFileMenuItem" Click="writeCleanConfigFileMenuItem_Click">
                </MenuItem>
                <Separator/>
                <MenuItem Header="Exit" x:Name="exitToolStripMenuItem" Click="exitToolStripMenuItem_Click">
                </MenuItem>
            </MenuItem>
        </Menu>
        <ListView x:Name="list"  Grid.Row="1" SelectionChanged="list_SelectionChanged" ItemsSource="{Binding}" SelectionMode="Single" BorderThickness="0">
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="Language" DisplayMemberBinding="{Binding Path=Name}" />
                </GridView>
            </ListView.View>
        </ListView>
        <WrapPanel x:Name="stack" Margin="0,0,0,0" Background="Gainsboro" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Top" PreviewMouseLeftButtonDown="stack_PreviewMouseLeftButtonDown"/>
    </Grid>
</Window>
